package com.dycc.libary.config;

import android.os.Bundle;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.Snackbar;
import android.view.View;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.dycc.libary.R;
import com.dycc.libary.R2;
import com.dycc.libary.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 异常错误处理界面
 */
@Route(path = "/libary/activity/ErrorActivity", name = "异常引导")
public class ErrorActivity extends BaseActivity {

    @BindView(R2.id.activity_error)
    CoordinatorLayout activityError;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_error);
        ButterKnife.bind(this);
    }

    @Override
    protected void initView() {
        showSnackBar(activityError, "出现异常，请返回", Snackbar.LENGTH_INDEFINITE, "确认", R.drawable.ic_launcher, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //回退到前页面
                finish();
            }
        });
    }

    @Override
    protected void initData() {

    }
}
